package com.mac.sentinel.controller;

import com.mac.sentinel.bean.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController
{

    @GetMapping("/findAll")
    public Object findAll()
    {
        List<User> list = new ArrayList<User>();

        User user = new User();
        user.setUsername("Leo");
        user.setAge(23);
        user.setPassword("12e3fds");
        list.add(user);

        User user2 = new User();
        user2.setUsername("Lily");
        user2.setAge(21);
        user2.setPassword("12efds3fds");
        list.add(user2);

        return list;
    }
}
